<!DOCTYPE html>
<html>
<head>
    <title>erp订单信息表</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <form class="form-inline" role="form">
                <a class="btn btn-default btn-sm" @click="reset"><i class="fa fa-refresh"></i></a>
                <a class="btn btn-danger btn-sm" @click="batchAudit">批量审核</a>
                <a class="btn btn-danger btn-sm" @click="batchEnter">批量录入</a>
                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.orderNo" @keyup.enter="query"
                           placeholder="订单号">
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <el-select v-model="q.sellerId" filterable placeholder="订单来源" size="mini">
                        <el-option v-for="item in e.sellerInfoList" :key="item.sellerId" :label="item.sellerName"
                                   :value="item.sellerId"></el-option>
                    </el-select>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.productionStatus" @keyup.enter="query">
                        <option value="">生产状态</option>
                        <option v-for="item in e.orderProductionStatusEnum" :value="item.id">{{item.describe}}</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.commissionStatus" @keyup.enter="query">
                        <option value="">成本录入状态</option>
                        <option v-for="item in e.commissionStatusEnum" :value="item.id">{{item.describe}}</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input class="form-control input-sm" v-model="q.beginCreatetime" style="width: 120px;"
                           @keyup.enter="query" @click="checkBeginDate" placeholder="订单下单时间"/>
                    至
                    <input class="form-control input-sm" v-model="q.endCreatetime" style="width: 120px;"
                           @keyup.enter="query" @click="checkEndDate" placeholder="订单下单时间"/>
                </div>&nbsp;&nbsp;&nbsp;

                <a class="btn btn-default btn-sm" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
                <span style="margin-left: 30px;color: red ">
            物流总额：{{sumTotal.logiTotal}}元
            </span>
                <span style="margin-left: 30px;color: red ">
            外协总额：{{sumTotal.suppTotal}}元
                </span>
                <span style="margin-left: 30px;color: red ">
             收银总额：{{sumTotal.payableAmountTotal}}元
                </span>

            </form>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <!-- 订单详情 -->

    <!--页面包含商品明细列表  订单商品外协供应商明细列表  订单备注 订单附言-->
    <div v-show="!showList">
        <!-- 操作 start -->
        <div class="panel-default" style="display: block;margin-bottom: 10px;" align="center">
            <!-- 审核 -->
            <div style="padding: 5px 0;" class="container">
                <div class="row">
                    <div class="col-md-8 col-md-offset-4">
                        <el-button size="small" class="pull-left" style="width: 100px;" @click="reload">返回</el-button>
                    </div>
                </div>
            </div>
        </div>
        <!-- 操作 end -->
        <!-- 订单信息 start -->
        <el-row>
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>订单编号：&nbsp;&nbsp;{{erpOrder.orderNo}}</span>
                </div>
                <div class="text item">
                    <div class="row" style="line-height:30px;font-size: 12px;">
                        <div class="col-md-3">
                            <div class="row">
                                <div class="col-md-4 text-right">会员名 ：</div>
                                <div class="col-md-8">{{erpOrder.memberName}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">联系人 ：</div>
                                <div class="col-md-8">{{erpOrder.shipName}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">生产状态 ：</div>
                                <div class="col-md-8">{{erpOrder.productionStatus}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">项目名称 ：</div>
                                <div class="col-md-8">{{erpOrder.projectName}}</div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="row">
                                <div class="col-md-4 text-right">发货状态 ：</div>
                                <div class="col-md-8">{{erpOrder.shipStatus}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">付款状态 ：</div>
                                <div class="col-md-8">{{erpOrder.payStatus}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">付款方式 ：</div>
                                <div class="col-md-8">{{erpOrder.payment}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">订单附言 ：</div>
                                <div class="col-md-8">{{erpOrder.memo}}</div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="row">
                                <div class="col-md-4 text-right">商品总额 ：</div>
                                <div class="col-md-8">{{erpOrder.totalAmount}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">优惠金额 ：</div>
                                <div class="col-md-8">
                                    {{erpOrder.pmtGoods}}
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">应付金额 ：</div>
                                <div class="col-md-8">{{erpOrder.payableAmount}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">已付金额 ：</div>
                                <div class="col-md-8">{{erpOrder.payed}}</div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="row">
                                <div class="col-md-4 text-right">收货人 ：</div>
                                <div class="col-md-8">{{erpOrder.shipName}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">联系方式 ：</div>
                                <div class="col-md-8">{{erpOrder.shipMobile}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">收货地区 ：</div>
                                <div class="col-md-8">{{erpOrder.shipArea}}</div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">收货地址 ：</div>
                                <div class="col-md-8">{{erpOrder.shipAddr}}</div>
                            </div>
                        </div>
                    </div>
                </div>
            </el-card>
        </el-row>
        <!-- 订单信息 end -->

        <!-- 商品明细列表 start -->
        <el-row>
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>商品明细列表</span>
                </div>
                <el-table
                        :data="orderItemDetailData"
                        border
                        max-height="250"
                        style="width: 100%"
                >
                    <el-table-column
                            prop="name"
                            label="产品名称">
                    </el-table-column>

                    <el-table-column
                            prop="addon"
                            label="商品规格属性">
                        <template slot-scope="scope">
                            {{scope.row.addon}}
                        </template>
                    </el-table-column>

                    <el-table-column
                            prop="price"
                            label="单价">
                    </el-table-column>

                    <el-table-column
                            prop="nums"
                            label="数量">
                    </el-table-column>
                    <el-table-column
                            prop="amount"
                            label="总价">
                    </el-table-column>
                    <el-table-column
                            prop="status"
                            label="分配情况"
                            :formatter="formatterStatus">
                    </el-table-column>
                </el-table>
            </el-card>
        </el-row>
        <!-- 商品明细列表 end -->

        <!-- 商品分配列表 start -->
        <el-row>
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>商品分配列表</span>
                </div>
                <div class="text item">
                    <el-table border stripe ref="multipleTable" :data="erpOrderProductionList"
                              tooltip-effect="dark" size="mini">
                        <el-table-column type="index" label="序号"></el-table-column>
                        <el-table-column prop="productionOrder" label="分配第三方单号"></el-table-column>
                        <el-table-column prop="erpItemId" label="商品ID"></el-table-column>
                        <el-table-column prop="erpItemName" label="商品名称"></el-table-column>
                        <el-table-column prop="attributeName" label="工艺"></el-table-column>
                        <el-table-column prop="producerName" label="供应商"></el-table-column>
                        <el-table-column prop="cost" label="分配价格"></el-table-column>
                        <el-table-column prop="allotType" label="分配类型"></el-table-column>
                        <el-table-column prop="isOwn" label="是否自做">
                            <template slot-scope="scope">
                                {{scope.row.isOwn == 1 ? '是' : '否'}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="csRemark" label="生产备注"></el-table-column>
                    </el-table>
                </div>
            </el-card>
        </el-row>
        <!-- 商品分配列表 end -->

        <el-row>
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>物流列表</span>
                </div>
                <div class="text item">
                    <el-table border stripe ref="multipleTable" :data="orderLogisticsList"
                              tooltip-effect="dark" size="mini">
                        <el-table-column prop="logiNo" label="物流单号"></el-table-column>
                        <el-table-column prop="logiCost" label="物流费用"></el-table-column>
                        <el-table-column prop="fromPeople" label="发货人"></el-table-column>
                        <el-table-column prop="fromArea" label="发货区域"></el-table-column>
                        <el-table-column prop="fromAddress" label="发货地址"></el-table-column>
                        <el-table-column prop="sendTime" label="发货时间"></el-table-column>
                        <el-table-column prop="toArea" label="收货省市区"></el-table-column>
                        <el-table-column prop="toAddress" label="收货地址"></el-table-column>
                        <el-table-column prop="toPhone" label="收货人电话"></el-table-column>
                        <el-table-column prop="sendType" label="发货类型">
                        </el-table-column>
                        <el-table-column prop="logiCompany" label="物流公司"></el-table-column>
                    </el-table>
                </div>
            </el-card>
        </el-row>
        <!-- 商品分配列表 end -->

    </div>

</div>

<script src="${request.contextPath}/statics/js/modules/finance/orderCost.js?_${.now?long}"></script>
</body>
</html>